1. Field of the Invention
The present invention relates generally to an inference engine, and more particularly, to a Max-Min processing circuit of a Fuzzy inference engine.
2. Description of the Related Art
An automatic controller actuates a controlled system by maintaining an error between a desired value and output value to be as small as possible. Types of controllers include a FID (Proportional Integral-Derivative) controller, an Optimal Controller, an Adaptive controller, a Variable Structure System (VSS) and a Neural Network.
Fuzzy control theory was introduced when Prof. Zadeh of the United States contributed an article to "Information & Control" in 1965. Although Fuzzy theory was initially treated with indifference, it began to attract public attention in 1974 when Prof. Mamdani of Great Britain obtained good results by applying Fuzzy theory to a steam engine that failed to realize an anticipated result with a generally known PID controller and Optimal controller.
Fuzzy control determines a proper manipulated variable with respect to an input through Fuzzy inference by representing a skilled operator's experience with Fuzzy sets and control rules.
A Fuzzy logic for Fuzzy control employs the following operations:
Fuzzy Negative EQU .mu.(NOT A) (X)=1-.mu..sub.A (X)
In above formula, .mu. is defined as a membership function, and the letter A means a certain set and X is an element. For example, the formula .mu..sub.A (X)=0.3 means that a membership for an element X to be a member of Set A is 0.3.
Fuzzy AND logic
Fuzzy AND logic is generalized by T-norm and defined as follows: EQU T: [0,1].times.[0,1].fwdarw.[0,1] EQU (1) T(x,1)=x, T(x, 0)=0 (boundary condition) EQU (2) IF x1.ltoreq.x2 THEN T(x1,y).ltoreq.T(x2,y)(monotonousness) EQU (3) T(x,y)=T(y,x) (commutative law) EQU (4) T{x, T(y,z)}=T{T(x,y), z}(associative law)
That is to say, among operators that make a real number between two types of 0 and 1 translate into a real number between 0 and 1, the above expressed operator is defined as T-norm that satisfies boundary condition, monotonousness, commutativeness and associativeness.
T-norm applied exemplarily is: EQU .mu..sub.(A AND B) (x)=MIN(.mu..sub.A (x),.mu..sub.B (x))
This formula is called MIN operation and means that minimum value (worse value) of both is selected.
Fuzzy OR logic
Fuzzy OR logic is generalized by S-norm and defined as follows: EQU S: [0,1].times.[0,1].fwdarw.[0,1] EQU (1) S(x,1)=1, S(x,0)=x EQU (2) IF x1.ltoreq.x2 THEN S(x1,y).ltoreq.S(x2,y) EQU (3) S(x,y)=S(y,x) EQU (4) S{x, S(y,z)}=S{S(x,,y), z}
S-norm applied exemplarily is: EQU .mu..sub.(A OR B) (X)=MAX (.mu..sub.A (x), .mu..sub.B (x))
This formula is called as MAX operation and means that maximum value (better value) of both is selected.
Fuzzy Relation
The method of obtaining a membership of Fuzzy relation is defined as follows: EQU .mu.R(x,y)=MIN(.mu..sub.A (x), .mu..sub.B (y))
An important principle of Fuzzy theory is Fuzzy inference, concluding a new fact from already known dependence of effect on cause. Fuzzy inference is chiefly formed as a control rule (or inference rule), such as [IF (conditional clause), THEN (conclusive clause)]. And a conditional clause can be subdivided as [conditional clause 1 AND conditional clause 2], the AND used here means the AND used in Fuzzy AND logic.
An exemplary water temperature control method for an electrically heated rice cooker using Fuzzy control rules will now be described.
a first control rule PA1 a second control rule PA1 a first control rule PA1 a second control rule
[IF water is warm AND temperature is regular THEN heater power shall be medium]
[IF water is tepid AND temperature is a little rising THEN heater power shall be great]
The Fuzzy sets such as `warm` and `tepid` in the above control rules may be defined as shown FIG. 1. When a current water temperature is 12.degree. C. and a marginal temperature change is 04., it is inferred hereinafter how great the power of a heater shall be.
FIG. 1 shows a conceptional view of Fuzzy inference.
At first, above mentioned first control rule and second control rule can also be expressed as;
[IF (water temperature=warm) AND (change of temperature=regular) THEN (heater power=medium)]
[IF (water temperature=tepid) AND (change of temperature=a little rising) THEN (heater power=great)]
In these rules, `water temperature`, `change of temperature`, etc., are `channels`, and `warm`, `tepid`, `regular`, `a little rising`, etc., are `labels` or `fuzzy sets`.
FIG. 1 shows labels of `warm` and `tepid`, in a channel of water temperature have triangle shaped membership functions respectively. A membership function of a label can also be defined as bell-shape, Gaussian function or right angled triangle shape in accordance with a characteristics of a certain label.
In the first control rule of FIG. 1, the current temperature 12.degree. C. has a membership of 0.2 in a Fuzzy set of `warm`, and the change of temperature 0.4 has a membership of 0.6 in a Fuzzy set of `regular`. If a minimum value is selected between two memberships (i.e., current temperature=0.2, change of temperature=0.6) according to Fuzzy AND logic, there can be obtained an outcome value 0.2, which implies that a Fuzzy set of `medium of heater power` is obtained.
In the same manner, in the second control rule, the current temperature 12.degree. C. has a membership of 0.8 in a Fuzzy set of `tepid` and the change of temperature 0.4 has a membership 0.8 in a Fuzzy set of `a little rising`. If a minimum value is selected between two memberships (i.e., current temperature =0.8, change of temperature=0.4) according to Fuzzy AND logic, an outcome value of 0.4 is obtained which implies that a Fuzzy set of `great of heater` is obtained.
A Fuzzy set can be inferred by applying Fuzzy OR logic to the consequences of the first control rule and the second control rule, as shown in FIG. 1.
Defuzzify operation obtains a usable quantity from a last inferred consequent part Fuzzy set. Defuzzification methods include a Maximum method of selecting the center of a Fuzzy variable having maximum membership, a medium value selecting method, and a center of gravity method. Intuitively, the most rational method is the center of gravity method, a widely used Defuzzification method. The center of gravity method selects an element corresponding to a centroid of a last inferred Fuzzy set. According to the center of gravity method, an output value of heater power 56.4 W is obtained from the last inferred Fuzzy set shown in FIG. 1.
Consequently, applying the first control rule and the second control rule, the output value of heater power 56.4 W is inferred from the current temperature 12.degree. C. and the temperature change 0.4.
A Fuzzy inference/defuzzification method used most frequently is MAX-MIN/center of gravity method suggested by Prof. Mamdani of Great Britain. Currently, other Fuzzy inference methods are known such as an arithmetical sum-integration-centroid method or a simplification method as well as MAX-MIN centroid method.
A MAX-MIN method for a Fuzzy controller will now be described. ##EQU1##
As a method for realizing the MAX-MIN algorithm actually, a software method, a look-up table type method or a hardware method of inference engine have been proposed.
The software method obtains an aimed output value with an algorithm, and the look-up table type method operates to provide rapid inference by referring to a look-up table, such as a Read Only Memory (ROM), where all outputs for all possible inputs inferred with the Fuzzy inference algorithm are stored.
The hardware inference engine method may be realized with a general purpose inference algorithm hardware for processing large amounts of data for various output or input channels and MAX-MIN operations. The inference algorithm hardware architecture determines the capacity of a Fuzzy controller.
Each method discussed above has disadvantages.
In the software method, the operating speed may be too slow for a system requiring rapid inference, because a software implementation of a MAX-MIN algorithm inevitably uses many input/output values and data-bases.
In the look-up table type method, the size of ROM is determined by the number of input channels and ranges of input value, making it difficult to realize a Fuzzy controller when the range of input values is 0-255 and the number of input channels is more than 3 (i.e., the size of ROM :16 G bytes).
In the hardware inference engine method of making a Fuzzy inference hardware, there are two process types: a random process and a sequence process of channels and rules. The random process can provide highly efficient capacity but is costly. On the other hand, the sequence process can not provide highly efficient capacity of a Fuzzy controller.